package com.sunlg.smarthome.base;

/**
 * 全局配置常量
 * Created by sunlg on 2017/2/22.
 */

public interface C {

    /**
     * 和风天气用户密钥
     */
    interface User{
        String KEY                          = "4f1acedd4816429e8bc436cb83f068fb";
    }

    /**
     * SharedPreferenced key
     */
    interface PreKey{
        String IS_REMEMBER               = "is_remember";
        String IS_AUTO_LOGIN             = "is_auto_login";
        String USER_ID                   = "userId";
        String USER_NAME                 = "username";
        String PASSWORD                  = "password";
        String EMAIL                     = "email";
        String PHONE                     = "phone";
    }

    /**
     * 接口路径
     */
    interface API{
        String SMARTHOME_API             = "http://123.207.25.22:8080/smarthome/api/";
        //String SMARTHOME_API             = "http://192.168.1.105:8080/smarthome/api/";
        //String SMARTHOME_API           = "http://192.168.1.100:8080/smarthome/api/";
        String SMARTHOME_LIGHT           = "light/";
        String SMARTHOME_CURTAIN         = "curtain/";
        String SMARTHOME_GATEWAY         = "gateway/";
        String SMARTHOME_ENVIR           = "environment/";
        String SMARTHOME_SECURITY        = "securityGuard/";
        String SMARTHOME_FIRE            = "fireProtect/";
        String SMARTHOME_PLANT           = "plantManage/";
        String SMARTHOME_NOTIFICATION    = "notification/";

        String REGISTER                  = "security/register";
        String LOGIN                     = "security/login";
        String LOGOUT                    = "user/logout";
        String UPDATE_USER               = "user/update";

        String LIGHT_ON                  = SMARTHOME_LIGHT+"on";
        String LIGHT_OFF                 = SMARTHOME_LIGHT+"off";
        String LIGHT_STATUS              = SMARTHOME_LIGHT+"status";
        String ADD_LIGHT                 = SMARTHOME_LIGHT+"add";
        String DEL_LIGHT                 = SMARTHOME_LIGHT+"delete";
        String GET_ALL_LIGHT             = SMARTHOME_LIGHT+"all";

        String ADD_CURTAIN               = SMARTHOME_CURTAIN+"add";
        String DEL_CURTAIN               = SMARTHOME_CURTAIN+"delete";
        String GET_ALL_CURTAIN           = SMARTHOME_CURTAIN+"all";
        String CURTAIN_FOLD              = SMARTHOME_CURTAIN+"fold";
        String CURTAIN_UNFOLD            = SMARTHOME_CURTAIN+"unfold";
        String CURTAIN_STOP              = SMARTHOME_CURTAIN+"stop";

        String ADD_GATEWAY               = SMARTHOME_GATEWAY+"add";
        String DEL_GATEWAY               = SMARTHOME_GATEWAY+"delete";
        String BIND_GATEWAY              = SMARTHOME_GATEWAY+"bind";
        String GET_GATEWAY_BY_ID         = SMARTHOME_GATEWAY+"get/id";
        String GET_GATEWAY_BY_USERID     = SMARTHOME_GATEWAY+"get/userId";
        String GET_GATEWAY_BY_NO         = SMARTHOME_GATEWAY+"get/no";
        String UPDATE_GATEWAY            = SMARTHOME_GATEWAY+"update";

        String ADD_ENVIR_DEVICE          = SMARTHOME_ENVIR+"device/add";
        String DEL_ENVIR_DEVICE          = SMARTHOME_ENVIR+"device/delete";
        String GET_ALL_ENVIR_DEVICE      = SMARTHOME_ENVIR+"device/all";
        String GET_ALL_LATEST_TEMP_HUM   = SMARTHOME_ENVIR+"all-temp-hum/latest";
        String GET_SECTION_TEMP          = SMARTHOME_ENVIR+"temp/section";
        String GET_SECTION_HUM           = SMARTHOME_ENVIR+"hum/section";
        String GET_LATEST_TEMP           = SMARTHOME_ENVIR+"temp/latest";
        String GET_LATEST_HUM            = SMARTHOME_ENVIR+"hum/latest";
        String AIR_CONDITIONER_ON        = SMARTHOME_ENVIR+"air-conditioner/on";
        String AIR_CONDITIONER_OFF       = SMARTHOME_ENVIR+"air-conditioner/off";

        String ADD_SECURITY_DEVICE       = SMARTHOME_SECURITY+"device/add";
        String DEL_SECURITY_DEVICE       = SMARTHOME_SECURITY+"device/delete";
        String GET_ALL_SECURITY_DEVICE   = SMARTHOME_SECURITY+"device/all";
        String GET_SECURITY_WARNING      = SMARTHOME_SECURITY+"warning/deviceId";
        String GET_ALL_SECURITY_WARNING  = SMARTHOME_SECURITY+"warning/all";
        String GET_SECURITY_DEVICE       = SMARTHOME_SECURITY+"device/id";

        String ADD_FIRE_DEVICE           = SMARTHOME_FIRE+"device/add";
        String DEL_FIRE_DEVICE           = SMARTHOME_FIRE+"device/delete";
        String GET_ALL_FIRE_DEVICE       = SMARTHOME_FIRE+"device/all";
        String GET_FIRE_WARNING          = SMARTHOME_FIRE+"warning/deviceId";
        String GET_ALL_FIRE_WARNING      = SMARTHOME_FIRE+"warning/all";
        String GET_FIRE_DEVICE           = SMARTHOME_FIRE+"device/id";

        String ADD_PUMP                  = SMARTHOME_PLANT+"pump/add";
        String DEL_PUMP                  = SMARTHOME_PLANT+"pump/delete";
        String GET_ALL_PUMP              = SMARTHOME_PLANT+"pump/all";
        String STOP_PUMP                 = SMARTHOME_PLANT+"pump/off";
        String START_PUMP                = SMARTHOME_PLANT+"pump/on";
        String ADD_RAIN_OBSERVER         = SMARTHOME_PLANT+"rainObserver/add";
        String DEL_RAIN_OBSERVER         = SMARTHOME_PLANT+"rainObserver/delete";
        String GET_ALL_RAIN_OBSERVER     = SMARTHOME_PLANT+"rainObserver/all";
        String GET_ALL_NOTIFICATION      = SMARTHOME_NOTIFICATION+"all";


        String WEATHER_API                  = "https://free-api.heweather.com/v5/";
        String NOW                          = "now";          //实况天气
        String FORECAST                     = "forecast";     //未来几天天气预报
        String SUGGESTION                   = "suggestion";   //生活指数
        String SEARCH                       = "search";       //城市查询
        String COND_IMG                     = "http://files.heweather.com/cond_icon/";   //天气状况图片


    }
    /**
     * 网络配置
     */
    interface Net{
        long CONNECT_TIME_OUT            = 10;
        long READ_TIME_OUT               = 15;
        long WRITE_TIME_OUT              = 15;
    }

    /**
     * Intent Action
     */
    interface Action {
        String LIGHT_STATUS_CHANGED      = "com.sunlg.smarthome.LightStatusChanged";
        String CURTAIN_STATUS_CHANGED    = "com.sunlg.smarthome.CurtainStatusChanged";
    }

    /**
     * 请求状态
     */
    interface ActionStatus {
        int SUCCESS                      = 0;
        int FAIL                         = 1;
    }


}
